<form class="page-wrap" method="post" action="./doc/json/ajaxDone.json" onsubmit="return validateCallback(this, navViewAjaxDoneClose)">

	<header>
		<div class="toolbar">
			<a class="bar-button back-button"><i class="icon icon-back"></i></a>
			<div class="header-title">
				<div class="title">表单提交 + 查找带回</div>
			</div>
		</div>
	</header>

	<div class="content">

		<div class="scroll-content dwz-scroll">
			<div class="scroll">

				<div class="pageFormContent">

					<div class="margin-v">
						<div class="form-item">
							<label>出差事由</label>
							<div class="item-content">
								<textarea class="textarea required" name="cause" rows="4" placeholder="请输入出差事由（必填）" maxlength="200" data-error="请输入出差事由"></textarea>
							</div>
						</div>
					</div>

					<div class="margin-v">
						<div class="form-item">
							<div class="item-content">
								<label>省市区</label>
								<input type="hidden" name="province">
								<input type="hidden" name="city">
								<input type="hidden" name="county">
								<input type="text" name="destination" class="required" placeholder="省、市、区" data-error="请选择省市区" readonly onclick="$.dialog.open({
										url: 'tpl/helper/dialogSelectRegion.html?dwz_callback=biz.helper.selectRegionRender',
										data: {
											target:this, 
											code: '',
											callback: function(data) {
												console.log(this, data)
												var form = this.parentsByTag('form').get(0);
												form.province.value = data.province;
												form.city.value = data.city;
												form.county.value = data.county;
												form.destination.value = data.names;
												
												$.dialog.close();
											}
										},
										pop: 'actionSheet'
									})">
								<i class="arrow-right"></i>
							</div>
						</div>

						<div class="form-item">
							<div class="item-content">
								<label>交通工具</label>
								<select name="traffic_vehicle" class="required" data-error="请选择交通工具">
									<option value="">请选择</option>
									<option value="1">飞机</option>
									<option value="2">火车</option>
									<option value="3">汽车</option>
									<option value="4">其它</option>
								</select>
							</div>
						</div>
						<div class="form-item">
							<div class="item-content">
								<label>单程往返</label>
								<select name="traffic_type" class="required" data-error="请选择单程往返">
									<option value="">请选择</option>
									<option value="1">单程</option>
									<option value="2">往返</option>
								</select>
							</div>
						</div>
						<div class="form-item">
							<div class="item-content">
								<label>开始时间</label>
								<input type="date" name="start_date" value="{{start_date}}" placeholder="请选择（必填）" class="required" data-error="请选择开始时间">
							</div>
						</div>
						<div class="form-item">
							<div class="item-content">
								<label>结束时间</label>
								<input type="date" name="end_date" value="{{end_date}}" placeholder="请选择（必填）" class="required" data-error="请选择结束时间">
							</div>
						</div>

					</div>

					<div class="margin-v">
						<div class="form-item">
							<div class="item-content">
								<label>同行人</label>
								<input type="hidden" name="together_id">
								<input type="text" name="together_txt" value="" placeholder="请选择（必填）" class="required" readonly data-error="请选择同行人" onclick="$.filterPanel.open({
									url: 'tpl/helper/filterPanelLookup.html?dwz_callback=biz.helper.filterPanelRender',
									data: {
										target: this,
										searchUrl: biz.server.getUrl(biz.server.persionList),
										filterItems: [
											{
												label: '部门',
												name: 'department',
												options: DepartmentStore.data
											}
										],
										callback: function(data) {
											console.log(this, data)
											var form = this.parentsByTag('form').get(0);
											form.together_id.value = data.id;
											form.together_txt.value = data.name
										}
									}
								})">
								<i class="arrow-right"></i>
							</div>
						</div>
					</div>

				</div>

			</div>
		</div>

	</div>

	<div class="form-bar">
		<button class="button primary" type="submit">提交</button>
	</div>
</form>